﻿using System;
using System.Collections.Generic;
using System.Text;
using ihongma.Common;
namespace ihongma.Web.UI.Page
{

    public partial class webcaselist : Web.UI.BasePage
    {
        protected int page;         //当前页码
        protected int category_id;  //类别ID
        protected int tag;  //类别ID
        protected string color;  //类别ID
        protected int totalcount;   //OUT数据总数
        protected string whe;
        protected string name;
        /// <summary>
        /// 重写虚方法,此方法将在Init事件前执行
        /// </summary>
        protected override void ShowPage()
        {
            page = DTRequest.GetQueryInt("page", 1);
            category_id = DTRequest.GetQueryInt("category_id");
            tag = DTRequest.GetQueryInt("tag");
            color = DTRequest.GetQueryString("color");
            name = DTRequest.GetQueryString("name");
            if (tag != 0)
            {
                whe = " tags like '%" + tag + "%'";
            }
            if (!string.IsNullOrEmpty(color))
            {
                whe = " color like '%" + color + "%'";
            }
            if (!string.IsNullOrEmpty(name))
            {
                whe = " name like '%" + name + "%'";
            }
        }

        protected string pagelisthtml(int pagesize, int page, int totalcount)
        {

            if (tag != 0)
            {
                return newget_page_link(pagesize, page, totalcount, "design_list2", tag, "__id__");
            }
            if (!string.IsNullOrEmpty(color))
            {
                return newget_page_link(pagesize, page, totalcount, "design_list3", color, "__id__");
            }
            if (!string.IsNullOrEmpty(name))
            {
                return newget_page_link(pagesize, page, totalcount, "design_list1", name, "__id__");
            }
         return   newget_page_link(pagesize, page, totalcount, "design_list", category_id, "__id__");
        }
    }
   
}
